Repository navigation
Add SI5351_NO_VCXO opt-out for flash savings - #118
Merged
Merged
Conversation
Arduino IDE users cannot pass per-sketch compiler flags, and a #define in the sketch did not reach si5351.cpp. set_vcxo, the pull-range test, and the VCXO parameter write are weak. When a sketch defines SI5351_NO_VCXO before #include <si5351.h>, the header stubs replace them and the linker drops the originals. -DSI5351_NO_VCXO still works, including together with SI5351_NO_CLK67. set_vcxo returns 0 after it writes registers and 1 when it writes nothing. Default builds stay 0 differing runs vs v2.4.2 and keep the Uno ceilings. The sketch opt-out saves 440 bytes; the compiler flag saves 472. Uno flash (arduino-cli 1.5.1, arduino:avr 1.8.6): min_runtime 10868 default, 10428 with the sketch #define, 10396 with the flag. Adds min_runtime_sketch_no_vcxo (10428) and min_runtime_sketch_no_clk67_no_vcxo (9390). Both fail on 47f14bd. Co-authored-by: Jason Milldrum <NT7S@users.noreply.github.com>
|
Memory usage change @ d66c44b
Click for full report table
Click for full report CSV |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a sketch-level opt-out for the VCXO code path. It works the same way as the CLK6/7 opt-out from #117.
-DSI5351_NO_VCXOas a compiler flag works too. This combines withSI5351_NO_CLK67.Changes
set_vcxo, the pull-range check and the register 162–164 write are now weak. The header stubs replace them when the opt-out is set.set_vcxonow returnsuint8_t: 0 on success, 1 when nothing was written. The opt-out stub always returns 1.reset()still clears registers 162–164.min_runtime_sketch_no_vcxo(10,428) and both-opt-outs (9,390). Both fail on 47f14bd.Uno flash (bytes)
Verification
These were re-run independently on a separate box at d66c44b, with arduino-cli 1.5.1 and arduino:avr 1.8.6.
run_v231_checks.sh --require-fixed: OVERALL PASS (38 PASS, 2 INFO).equiv_vs_v242: 0 differing runs.prove_v242_negative.sh: PASS.